import sys
import os
import cx_Oracle

connection = cx_Oracle.connect("kb/kb@lreposit")

def main():
   

   # the following statements must be issued in normal SYSDBA mode
   l_cursor = connection.cursor()
   #l_cursor.execute("alter database mount")
   #l_cursor.execute("alter database open")
 
def list_to_db(parent,dc):
 #for fn in dc:
  cursor = connection.cursor()
  cursor.execute("insert into words values (:a1,:a2)",a1 = parent, a2 = dc)
  connection.commit() 

if __name__ == '__main__':
    main()
    list_to_db("1","2")